package com.ahy231.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.*;
import lombok.*;
import org.apache.ibatis.type.JdbcType;

import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * @author ahy231
 * @date 2021/7/26 10:01
 * @description
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("交易")
public class Transaction {

    @ApiModelProperty("主键")
    @TableId(type = IdType.ASSIGN_ID)
    private Long transactionId;

    @ApiModelProperty("交易名称")
    private String name;

    @ApiModelProperty("交易内容")
    private String content;

    @ApiModelProperty("角色")
    private Integer role;

    @ApiModelProperty("商家")
    private Long belong;

    @ApiModelProperty("客户")
    private Long userId;

    @ApiModelProperty("发布时间")
    @TableField(jdbcType = JdbcType.TIMESTAMP)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp publishTime;

    @ApiModelProperty("交易接受时间")
    @TableField(jdbcType = JdbcType.TIMESTAMP)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp acceptTime;

    @ApiModelProperty("交易状态（0/未发布、1/待接单、2/取消、3/接受、4/执行、5/验收、6/结束）")
    private Integer status;

    @ApiModelProperty("价格")
    private BigDecimal price;
}
